NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A TB09
List Manager & LClick

Q Is there any way I can stop LClick from hiliting the cells when users scroll the cursor outside the list's rView area? My program allows users to select more than one item from a list and then DRAG these selected items to another list and DROP them there. But I run into a problem with the LClick function when I hold down my mouse and drag these items OUTSIDE the list's rview area. This function still hilits other cells when I move my cursor up or down. Orginally, I only selected 3 items, but now I have more than 3 items highlighted because of the resulting action by LCLICK. I already looked at the sample code ModalList: it has this problem too.

A If you want to use LClick and not change the hilite of cells when the mouse leaves the rView of the list, the best way is to install an LClickLoop procedure and check where the mouse is at any given time. If the mouse is outside of your list's rect as in:
    GetMouse(&localPt);
    if (PtInRect(localPt, &(*list)->rView) == false) {
    // we're out of the list, return false
    return false;
 }
 else
    return true;

return false to tell the List Manager that the current click should be aborted. It turns out that this is a nice way to start a drag as well, since you know that the mouse has left the rect.

[May 01 1995]


Developer Documentation | Technical Notes | Development Kits | Sample Code